<template>
  <!-- 请购单列表信息 -->
  <el-table
    ref="table"
    row-key="id"
    :data="list"
    border
    :header-cell-style="{ background: '#f5f7fa' }"
  >
    <el-table-column label="编号" prop="purchaseCode"> </el-table-column>
    <el-table-column label="日期" prop="createTime"> </el-table-column>
    <el-table-column label="请购人部门" prop="departmentName"></el-table-column>
    <el-table-column label="请购人" prop="adminName"></el-table-column>
    <el-table-column label="经办人" prop="operatorName"></el-table-column>
    <el-table-column label="状态" prop="requisitionState">
      <template #default="scope">
        <!--请购单状态：0未生单 1部分生单 2已生单-->
        <p v-if="scope.row.requisitionState == 0">未生单</p>
        <p v-if="scope.row.requisitionState == 1">部分生单</p>
        <p v-if="scope.row.requisitionState == 2">已生单</p>
      </template>
    </el-table-column>
  </el-table>
</template>
<script>
export default {
  name: '',
  data () {
    return {}
  },
  props: {
    list: {
      type: Array,
      required: true,
      default: () => {
        return []
      }
    }
  }
}
</script>